package com.lqm.dao;

import com.lqm.entity.home.Project;
import com.lqm.entity.home.Slide;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

public interface SlideDao  extends JpaRepository<Slide,Integer>, PagingAndSortingRepository<Slide,Integer> {
    List<Slide> findAllByStatus(int status, Sort sort);

//    @Modifying
//    @Query(value = "update Slide s set s.status=:status where s.projectId= :#{#slide.slideId}")
//    Project setSlideStatus(Slide slide, int status);
}
